GDK W32: Be honest about supported clipboard formats
authorРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 31 Oct 2018 05:58:34 +0000 (05:58 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 31 Oct 2018 08:40:50 +0000 (08:40 +0000)
commit4c6d60ce2bc4c85e7d9f7dc927a7cc9bb533c4ce
treeb4161ec47007edf1c13ec11257a0b52e6788593b
parentb4acf8160936bfc27ad5e255d0cfe4500cdbd7f7
GDK W32: Be honest about supported clipboard formats

Do not lie to W32 about the formats that we provide or accept.

Originally the logic behind such lies was that GdkPixbuf allows us to
convert any supported image to BMP or PNG, and therefore we should
announce that we always provide/accept BMP and PNG along with other
formats.

But that's not how it works. GDK has built-in serializers and
deserializers for all pixbuf formats (where it just invokes GdkPixbuf
API) and will use them automatically to read or write GdkTexture
objects (internally wrapping GdkPixbuf objects where necessary). The
encoding and decoding of images is handled
by GdkContent(De)Serializers, backend has nothing to do with it.

Therefore W32 GDK backend should only offer formats that it can
actually do conversion for by itself (such as image/bmp <-> CF_DIB,
or text/uri-list <-> CFSTR_SHELLIDLIST).
gdk/win32/gdkclipdrop-win32.c